<div class="layuimini-container">
    <div class="layuimini-main">
        <fieldset id="searchFieldset_currentTable" class="table-search-fieldset layui-hide">
            <legend>{:lang("common.condition_search")}</legend>
            <form class="layui-form layui-form-pane form-search">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">{:lang("amass.type")}</label>
                    <div class="layui-input-inline">
                        <select name="a_type_eq" data-select-type="amass_type_list"
                                default-value="{$param.a_type_eq|default=''}"
                                data-select-default="{:lang('common.choose')}">
                        </select>
                    </div>
                </div>

                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">{:lang("amass.travel_name")}</label>
                    <div class="layui-input-inline">
                        <input name="a_travel_name_like" class="layui-input"
                               value="{$param.u_travel_name_like|default=''}"
                               placeholder="{:lang('common.input')}{:lang('amass.travel_name')}">
                    </div>
                </div>

                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">{:lang("amass.mobile")}</label>
                    <div class="layui-input-inline">
                        <input name="a_mobile_like" class="layui-input" value="{$param.u_mobile_like|default=''}"
                               placeholder="{:lang('common.input')}{:lang('amass.mobile')}">
                    </div>
                </div>

                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">{:lang("amass.position")}</label>
                    <div class="layui-input-inline">
                        <input name="a_position_like" class="layui-input" value="{$param.u_position_like|default=''}"
                               placeholder="{:lang('common.input')}{:lang('amass.position')}">
                    </div>
                </div>

                <div class="layui-form-item layui-inline" style="margin-left:50px">
                    <button type="submit" class="layui-btn layui-btn-normal" data-type="tableSearch"
                            lay-submit lay-filter="search_currentTable">{:lang("common.btn_search")}
                    </button>
                </div>
            </form>
        </fieldset>

        <table id="currentTable"
               data-auth-add="{:auth(request()->controller().'/add')}"
               data-auth-edit="{:auth(request()->controller().'/edit')}"
               data-auth-delete="{:auth(request()->controller().'/delete')}"
               data-auth-print="{:auth(request()->controller().'/print')}"
               data-auth-export="{:auth(request()->controller().'/export')}">
        </table>
    </div>
</div>
<script>
    layui.use(['myCommon'], function () {
        let myCommon = layui.myCommon;
        myCommon.table.render({
            where: myCommon.generateCondition()
            , totalRow: true
            , limit: "{$param.limit|default='300'}"
            , cols: [[
                {type: "checkbox"}
                , {type: 'numbers', width: 55, title: '{:lang("common.numbers")}'}
                , {
                    field: 'type', width: 60, title: '{:lang("amass.type")}',
                    sort: true, templet: myCommon.table.type, typeList: 'amass_type_list'
                }
                , {field: 'travel_name', minWidth: 80, title: '{:lang("amass.travel_name")}', sort: true}
                , {field: 'username', width: 100, title: '{:lang("amass.username")}', sort: true}
                , {field: 'mobile', width: 200, title: '{:lang("amass.mobile")}', sort: true}
                , {field: 'position', width: 100, title: '{:lang("amass.position")}', sort: true}
                , {field: 'person_num', width: 60, title: '{:lang("amass.person_num")}', sort: true}
                , {field: 'update_time', width: 160, title: '{:lang("common.update_time")}', sort: true}
                , {
                    width: 105, title: '{:lang("common.operate")}',
                    templet: myCommon.table.tool, operat: ['edit', 'delete']
                }
            ]]
            , done: function (res) {
                myCommon.tableTotal(this, res.data, ['person_num'])
            }
        });
        myCommon.listen();
    });
</script>
